<?php
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Models\Relations\UserInfoTrait;

/**
 *
 * @author Joker
 * order_sn VARCHAR(25) NOT NULL COMMENT '商户唯一订单号',
	price  decimal(10,2) DEFAULT 0 COMMENT '订单价格',
	goods_name VARCHAR(100) NOT NULL DEFAULT NULL COMMENT '商品名称',
	goods_description text NOT NULL DEFAULT NULL COMMENT '商品描述',
	order_type TINYINT(1) NOT NULL DEFAULT 0 COMMENT '订单类型，0：积分充值，1:其他商品',
	pay_type  CHAR(15) NOT NULL COMMENT '支付类型',
	paytransactionid varchar(30) DEFAULT NULL COMMENT '支付流水号',
	payordersn varchar(30) DEFAULT NULL COMMENT '支付订单号',
	user_id int(11) NOT NULL COMMENT '用户编号',
	｀status｀ TINYINT(1) NOT NULL COMMENT '状态 0:待支付，1:已支付，2:支付失败，3:交易成功', 
	`gmt_payment`  
 */
class Order extends Model
{
    use UserInfoTrait;
    protected $table="orders";
    
    protected $primaryKey = 'id';
    
    protected $fillable = ['id','order_sn','price','goods_name','goods_description','order_type','pay_type','paytransactionid',
        'payordersn','user_id','status','gmt_payment'];
}